home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor2 / libeval.doc < prev    next >
Text File  |  1995-03-31  |  4KB  |  100 lines

  1.                        úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ 
  2.                        3 HP48G/GX -- LIBEVAL 3 
  3.                        àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù 
  4.                              by Joe Horn 
  5.  
  6. The G/GX has a new command: LIBEVAL.  It's sort of like SYSEVAL, but 
  7. instead of taking a memory address (which could be ambiguous due to 
  8. the G/GX's massive need for bank switching), it takes XLIB numbers. 
  9. It's a "back door" for us hackers.  Unlike the ELSYSEVAL command in 
  10. the HP Solve Equations Library Card, which only worked for the 
  11. libraries in that card, LIBEVAL works for *any* library, including the 
  12. hidden ones in the operating system. 
  13.  
  14.       CAUTION: LIBEVAL, like SYSEVAL, is both powerful and 
  15.       dangerous. If used with incorrect input(s) and/or in 
  16.       the wrong environment, it can nuke your memory. 
  17.  
  18. LIBEVAL takes a single user binary integer of the form #LLLFFFh, where 
  19. LLL is the library ID (hex), and FFF is the three-digit function 
  20. number (hex, with leading zeros if necessary). 
  21.  
  22. For example, the R->B command is XLIB 2 9.  So you can perform a R->B 
  23. by executing #2009h LIBEVAL.  Try it: 10 #2009h LIBEVAL ÄÄ  #Ah. 
  24.  
  25. Using it for named commands is unnecessary, but the G/GX is highly 
  26. XLIB oriented (again, due to the need for bank switching), and there 
  27. are many useful and interesting features accessible only thru LIBEVAL. 
  28.  
  29. A prime example is the G/GX's inability to programmatically launch the 
  30. new "dialog boxes".  Suppose a program needs to print things; it would 
  31. be awfully nice to be able to throw the I/O PRINT dialog box onto the 
  32. screen.  The User's Guide is no help here, and in fact it would seem 
  33. impossible to do. But #B4197 LIBEVAL is all it takes!  Try it.  Cool, 
  34. huh? 
  35.  
  36. Here's a table of a few useful LIBEVAL magic numbers that I've been 
  37. able to nail down.  Be sure to type them in correctly! 
  38.  
  39. # hex  LIBEVAL result 
  40. ÄÄÄÄÄ  ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 
  41.  
  42. B2000 *CMD (Last Command window) 
  43.  
  44. B2001  CHARS Application 
  45.  
  46. B41C1  MODES Application input form 
  47. B41CF *Flag Browser (returns TRUE or FALSE to level 1; just DROP it) 
  48. B41D7 *MEMORY Application (aka Variable Browser) 
  49.  
  50. B4000 *SOLVE Application choose box 
  51. B4001  Solve Equation input form 
  52. B4017  Solve Differential Equation input form 
  53. B402C  Solve Polynomial input form 
  54. B4033  Solve Linear System of Equations input form 
  55. B4038  Solve Financial Equation (TVM) input form 
  56.  
  57. B4045  PLOT input form 
  58.  
  59. B4113 *SYMBOLIC Application choose box 
  60. B4114  Integrate input form 
  61. B4122  Differentiate input form 
  62. B412B  Taylor Polynomial Expansion input form 
  63. B412D  Isolate A Variable input form 
  64. B4130  Solve Quadratic input form 
  65. B4131  Manipulate Expression input form 
  66.  
  67. B4137 *TIME Application choose box 
  68. B4138  Set Alarm input form 
  69. B415B  Set Time and Date input form 
  70. B416E *Alarm Browser (aka Alarm Catalog) 
  71.  
  72. B4175 *STAT Application choose box 
  73. B4176  Single-Variable Statistics input form 
  74. B417D  Frequencies input form 
  75. B417F  Fit Data input form 
  76. B418F  Summary Statistics input form 
  77.  
  78. B4192 *I/O Application choose box 
  79. B4193  Send to HP 48 input form 
  80. B4197  Print input form 
  81. B41A8  Transfer input form 
  82. B50FF *Get from HP 48 (immediate) 
  83.  
  84. E4012 *recalls the contents of the reserved variable 'Mpar' 
  85.  
  86.       * ÄÄ  see note below 
  87. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ 
  88.  
  89. Note: Ray Depew figured out that if you run a program that looks like: 
  90.  
  91.                    <<  #B2001h  LIBEVAL  LCD->  >> 
  92.  
  93. and exit the input form by pressing the ON key, you'll grab a snapshot 
  94. of the screen into a grob on the stack!  Excellent for printing 
  95. examples of input forms (see PCLPRINT.LIB and EPSPRINT.LIB). 
  96.  
  97.   * ÄÄ   This method does *not* work with the LIBEVAL's listed with an 
  98. asterisk above; it only seems to work for input forms and the CHARS 
  99. application. 
  100.